package ex.vo;

import java.text.SimpleDateFormat;

public class Event {
    public  Integer key;
    public  long timestamp;

    public Event(Integer key, long timestamp) {
        this.key = key;
        this.timestamp = timestamp;
    }

    public Event() {
    }

    @Override
    public String toString() {
        SimpleDateFormat dateformat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String dateStr = dateformat.format(timestamp);
        return "Event{" +
                "key='" + key + '\'' +
                ", timestamp=" + timestamp + '\'' +
                ", date=" + dateStr +
                '}';
    }
}
